const interception: {
  itemConfig?: { [key: string]: <T>(config: any) => T };
  validate?: (form: any, callback: (isValid: boolean) => void) => void;
  event?: Function;
  get?: (vm: any, prop: string, value: any, config: any) => any;
  set?: (vm: any, prop: string, value: any, config: any) => any;
  props?: (props: { [key: string]: any }, vm: any) => { [key: string]: any };
  rule?: (rule: any, form: any) => any;
} = {
  validate(form: any, callback: (isValid: boolean) => void) {
    form
      .validate()
      .then(() => {
        callback(true);
      })
      .catch(() => {
        callback(false);
      });
  },
};

export default interception;
